package com.springboot.dto;

public class ChatList {
    private String logoLink;
    private String senderName;
    private String lastChat;
    public String chatTime;
    private Integer boolPicture;
    private String lastChatState;
    private String otherTel;

    public ChatList(){
    }

    public ChatList(String logoLink, String senderName, String lastChat, String chatTime,
                    Integer boolPicture, String lastChatState, String otherTel)
    {
        this.logoLink=logoLink;
        this.senderName=senderName;
        this.lastChat=lastChat;
        this.chatTime=chatTime;
        this.boolPicture=boolPicture;
        this.lastChatState=lastChatState;
        this.otherTel=otherTel;
    }

    public Integer getBoolPicture() {
        return boolPicture;
    }

    public void setBoolPicture(Integer boolPicture) {
        this.boolPicture = boolPicture;
    }

    public String getChatTime() {
        return chatTime;
    }

    public void setChatTime(String chatTime) {
        this.chatTime = chatTime;
    }

    public String getLastChat() {
        return lastChat;
    }

    public void setLastChat(String lastChat) {
        this.lastChat = lastChat;
    }

    public String getLastChatState() {
        return lastChatState;
    }

    public void setLastChatState(String lastChatState) {
        this.lastChatState = lastChatState;
    }

    public String getLogoLink() {
        return logoLink;
    }

    public void setLogoLink(String logoLink) {
        this.logoLink = logoLink;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getOtherTel() {
        return otherTel;
    }

    public void setOtherTel(String otherTel) {
        this.otherTel = otherTel;
    }

    //封装Json字符串
    @Override
    public String toString() {
        if(logoLink!=null)
        {
            logoLink = logoLink.replaceAll("", "");
        }
        return "{" +
                "\"messageUrl\":\"" + logoLink + '\"' +
                ", \"name\":\"" + senderName + '\"' +
                ", \"messageText\":\"" + lastChat + '\"' +
                ", \"messageTime\":\"" + chatTime + '\"' +
                ", \"type\":\"" + boolPicture + '\"' +
                ", \"isRight\":\""+ lastChatState + '\"' +
                ", \"id\":\""+ otherTel + '\"' +
                '}';
    }
}
